//导出所有路由
const fs = require('fs')
function routing(app) {
    const file = fs.readdirSync(__dirname)
    file.forEach(name => {
        if (name !== 'index.js') {
            const route = require(`./${name}`)
            app.use(route.routes(),route.allowedMethods())
        }
    })
}
module.exports = routing
